﻿#include "thread_looper.h"
#include <string>
using namespace std;

int main()
{
	ThreadLooper<int> thread_looper;
	for (int i = 1000; i > 0; --i)
	{
		thread_looper.enqueueDelayed([i]
			{ std::cout << "delay exexute:" << i << std::endl; },
			i,
			i);
	}

	for (int i = 1000; i > 0; --i)
	{

		if (i % 2 == 0)
		{
			thread_looper.remove(i);
		}
	}

	std::this_thread::sleep_for(5s);
	return 0;
}